# -*- coding: utf-8 -*-
import sys
reload(sys)
sys.setdefaultencoding('utf-8')

test = u'\n\u6682\u65e0\n'
test.decode('utf-8').encode('utf-8')
with open('./test.txt','a+') as f:
    f.write(test)
print test
